package ioc07.controller;

import ioc07.service.UserService;
import lombok.RequiredArgsConstructor;
// import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * Author：汤小洋
 * Date：2023-09-19 16:39
 * Description：<描述>
 */
@Controller
@RequiredArgsConstructor // 根据类中final属性，生成带参的构造方法
public class UserController {

    // @Autowired(required = false)
    // @Resource
    private final UserService userService;

    // @Autowired
    // public void setUserService(UserService userService) {
    //     this.userService = userService;
    // }

    // @Autowired // 如果类中只有一个构造方法，则可以省略该注解
    // public UserController(UserService userService) {
    //     this.userService = userService;
    // }

}
